<template>
  <div>
      </a-form-model-item>
      <a-form-model-item label="用户名">
        <a-input v-model="username" placeholder="请输入用户名"/>
      </a-form-model-item>
      <a-form-model-item label="新用户名">
        <a-input v-model="new_username" placeholder="请输入新用户名"/>
      </a-form-model-item>
      <a-form-model-item label="密 码">
        <a-input v-model="password" type="password" placeholder="请输入密码"/>
      </a-form-model-item>
      <a-form-model-item label="手机号">
        <a-input v-model="phone" placeholder="请输入手机号"/>
      </a-form-model-item>

      </a-form-model-item>


      <a-form-model-item >
        <a-button @click="put" type="primary">
          修改
        </a-button>
      </a-form-model-item>
    </a-form-model>
  </div>
</template>
<script>
import axios from 'axios'

export default {
  data() {
    return {
      username: '', // 用户名
      new_username: '', // 用户名
      password: '', // 密码
      phone: '', // 手机号
      id : ''
    };
  },
  methods: {
      put(){
          this.$axios.put('putuser/',{
              'username':this.username,
              'new_username':this.new_username,
              'password':this.password,
              'phone':this.phone
          }).then(res=>{
              console.log(res.data);
          })
      }
  },
  created() {
  }
};
</script>
